{{useCss "/app-pages/css/admin/newslist.scss"}}
<div class="newslist">
	<table>
		<thead>
			<td>序号</td>
			<td>标题</td>
			<td>创建时间</td>
			<td>操作</td>
		</thead>
		{{#if $Cache.admin.newslist.list.length}}
		{{#each $Cache.admin.newslist.list}}
		<tr>
			<td>{{$Index+1}}</td>
			<td>{{title}}</td>
			<td>{{#Time createtime}}</td>
			<td>
				<a event-click="{{'$Top.$Event.admin.newlist.update'}}">修改</a>
				<a event-click="{{'$Top.$Event.admin.newlist.delete'}}">删除</a>
			</td>
		</tr>
		{{/each}}
		{{#else}}
		<tr>
			<td colspan="4">
				<p>暂未添加任何数据</p>
			</td>
		</tr>
		{{/if}}
		<tr>
			<td colspan="4">
				<div class="pagebox">
		            <a class="button icon-angle-left" event-click="{{'$Event.admin.newslist.prePage'}}"></a>
		            {{#each $Cache.admin.newslist.pages}}
		            <href to="/admin/newslist.html?page={{$Index}}&num={{$Top.$Cache.admin.newslist.num}}" class="{{($Top.$Cache.admin.newslist.page==$Index)&&'focus'}}">{{$Index+1}}</href>
		            {{/each}}
		            <a class="button icon-angle-right" event-click="{{'$Event.admin.newslist.nextPage'}}"></a>
		        </div>
			</td>
		</tr>
	</table>
</div>